From: Richard M. Stallman Date: Tue, 25 May 1993 21:20:08 +0000 (+0000) Subject: (rmail-summary-mark-deleted): Check for end of buffer. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95960 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=fedc33f7a838ed2e2ad7f47f4600753ac3e58ca9;p=emacs.git (rmail-summary-mark-deleted): Check for end of buffer. Pass t as NOWARN when calling rmail-summary-goto-msg. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index bccfc9eb8f4..d4b629d0a89 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -392,15 +392,16 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given." (rmail-summary-delete-forward t)) (defun rmail-summary-mark-deleted (&optional n undel) - (and n (rmail-summary-goto-msg n nil t)) - (let ((buffer-read-only nil)) - (skip-chars-forward " ") - (skip-chars-forward "[0-9]") - (if undel - (if (looking-at "D") - (progn (delete-char 1) (insert " "))) - (delete-char 1) - (insert "D"))) + (and n (rmail-summary-goto-msg n t t)) + (or (eobp) + (let ((buffer-read-only nil)) + (skip-chars-forward " ") + (skip-chars-forward "[0-9]") + (if undel + (if (looking-at "D") + (progn (delete-char 1) (insert " "))) + (delete-char 1) + (insert "D")))) (beginning-of-line)) (defun rmail-summary-mark-undeleted (n)